/*
 * @Author: Your Name you@example.com
 * @Date: 2023-05-12 19:30:47
 * @LastEditors: Your Name you@example.com
 * @LastEditTime: 2023-05-16 10:14:47
 * @FilePath: \elder-admin\src\router\index.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { createRouter, createWebHashHistory } from 'vue-router'

const routes = [
  {
    path: '/',
    name: 'Logins',
    redirect: './Login',
    component: () => import(/* webpackChunkName: "about" */ '../views/Login.vue')
  },
  {
    path: '/Login',
    name: 'Login',
    component: () => import(/* webpackChunkName: "about" */ '../views/Login.vue')
  },
  {
    path: '/updatesuccess',
    name: 'Updatesuccess',
    component: () => import(/* webpackChunkName: "about" */ '../components/Updatesuccess.vue')
  },
  {
    path: '/updatePassword',
    name: 'UpdatePassword',
    component: () => import(/* webpackChunkName: "about" */ '../components/UpdatePassword.vue')
  },
  {
    path: '/admin',
    name: 'AdminControl',
    redirect:'/admin/MerchantManager',
    component: () => import(/* webpackChunkName: "about" */ '../components/AdminControl.vue'),
    children:[
      {
        path: '/admin/MerchantManager',
        name: 'MerchantManager',
        component: () => import(/* webpackChunkName: "about" */ '../components/MerchantManager.vue')
      },
      {
        path: '/admin/ElderManager',
        name: 'ElderManager',
        component: () => import(/* webpackChunkName: "about" */ '../components/ElderManager.vue')
      },
      {
        path: '/admin/AdminManager',
        name: 'AdminManager',
        component: () => import(/* webpackChunkName: "about" */ '../components/AdminManager.vue')
      },
      {
        path: '/admin/CommunityManager',
        name: 'CommunityManager',
        component: () => import(/* webpackChunkName: "about" */ '../components/CommunityManager.vue')
      }
    ]
  }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
